
interface Shape{
     int C = 1;
     int B = 2;
     void draw();

}
class  Rect implements Shape{

    @Override
    public void draw() {
        System.out.println("矩形");
    }
}
class Flower implements Shape{

    @Override
    public void draw() {
        System.out.println("花");
    }
}
//抽象类中可以有普通方法,接口只能是抽象类
abstract class Test1  implements Shape{
    public void te(){
        System.out.println("+++++++");
    }
}

public class Test {
    public  static void drawMap(Shape shape){
        shape.draw();
    }

    public static void main(String[] args) {
        Shape shape = new Rect();
        Shape shape1 = new Flower();
        //drawMap(shape);
        //drawMap(shape1);
        Test test = new Test();
        Shape[] shapes = {new Rect(),new Flower()};


        for(Shape shape2 :shapes){
            shape2.draw();

            drawMap(shape2);
        }
    }



}
